package com.db.logging;

import java.util.Date;

/**
 * @author nulls.narik
 */
public class MyConsoleLogger extends AbstractLogger {

    protected MyConsoleLogger(String name) {
        super(name);
    }

    @Override
    public boolean isDebugEnabled() {
        return true;
    }

    @Override
    public void debug(String s) {
        System.out.println("[DEBUG]. Time: " + new Date());
        System.out.println(s);
    }

    @Override
    public void debug(String s, Object o) {
        System.out.println("[DEBUG]. Time: " + new Date());
        System.out.println(String.format(s, o));
    }

    @Override
    public void debug(String s, Object o, Object o2) {
        System.out.println("[DEBUG]. Time: " + new Date());
        System.out.println(String.format(s, o, o2));
    }

    @Override
    public void debug(String s, Object... objects) {
        System.out.println("[DEBUG]. Time: " + new Date());
        System.out.println(String.format(s, objects));
    }

    @Override
    public boolean isInfoEnabled() {
        return true;
    }

    @Override
    public void info(String s) {
        System.out.println("[INFO]. Time: " + new Date());
        System.out.println(s);
    }

    @Override
    public void info(String s, Object o) {
        System.out.println("[INFO]. Time: " + new Date());
        System.out.println(String.format(s, o));
    }

    @Override
    public void info(String s, Object o, Object o2) {
        System.out.println("[INFO]. Time: " + new Date());
        System.out.println(String.format(s, o, o2));
    }

    @Override
    public void info(String s, Object... objects) {
        System.out.println("[INFO]. Time: " + new Date());
        System.out.println(String.format(s, objects));
    }

    @Override
    public boolean isErrorEnabled() {
        return true;
    }

    @Override
    public void error(String s) {
        System.out.println("[ERROR]. Time: " + new Date());
        System.out.println(s);
    }

    @Override
    public void error(String s, Object o) {
        System.out.println("[ERROR]. Time: " + new Date());
        System.out.println(String.format(s, o));
    }

    @Override
    public void error(String s, Object o, Object o2) {
        System.out.println("[ERROR]. Time: " + new Date());
        System.out.println(String.format(s, o, o2));
    }

    @Override
    public void error(String s, Object... objects) {
        System.out.println("[ERROR]. Time: " + new Date());
        System.out.println(String.format(s, objects));
    }
}
